#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Package.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ElementImport;
class PackageImport;

/// <summary>
/// Profile
/// A profile defines limited extensions to a reference metamodel with the purpose
/// of adapting the metamodel to a specific platform or domain.
/// </summary>
class UMLMODEL_EXPORT Profile : public Package {

public: // Constructors and destructors
    explicit Profile(const QString& umlType="uml::Profile");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// metaclassReferences getter
    /// References a metaclass that may be extended.
    /// </summary>
    vector<shared_ptr<ElementImport>>& metaclassReferences();

    /// <summary>
    /// metamodelReferences getter
    /// References a package containing (directly or indirectly) metaclasses that may be
    /// extended.
    /// </summary>
    vector<shared_ptr<PackageImport>>& metamodelReferences();

private: // Fields
    /// <summary>
    /// metaclassReferences
    /// References a metaclass that may be extended.
    /// </summary>
    vector<shared_ptr<ElementImport>> metaclassReferences_;

    /// <summary>
    /// metamodelReferences
    /// References a package containing (directly or indirectly) metaclasses that may be
    /// extended.
    /// </summary>
    vector<shared_ptr<PackageImport>> metamodelReferences_;

};

} // namespace uml
